<?php
/**
 * M_quantification model 文件
 * @author  yxx
 * @date 2017-10-12
 */
class M_device extends MY_Model {

    public $table = 't_device';
    function __construct() {
        parent::__construct ();
    }
    // //设备任务列表
    // public function get_device_tasklist($type,$table,$PID){
    // 	$sql = "SELECT a.id, a.pubtime,b.name, b.place, b.indexparam, b.status,{$type} as type
				// 	FROM {$table} a 
				// 	LEFT JOIN t_device b ON b.id =  a.devid 
				// 	LEFT JOIN t_device_task_sub s ON a.id =s.taskid
				// 	WHERE s.pid ={$PID} AND s.type ={$type} AND a.status =1
				// 	ORDER BY a.pubtime DESC";
    // 	$data = $this->querylist($sql);
    //          return $data;
    // }
    // //设备巡检列表
    // public function get_device_list($PID,$where){
    //          $sql = "SELECT a.id, a.result, a.pubtime, b.name, b.place, b.typename as indexparam, b.status,b.number,a.devid 
    //                         FROM t_device_inspecttask a 
    //                         LEFT JOIN t_device b ON b.id =  a.devid 
    //                         LEFT JOIN t_device_task_sub s ON a.id =s.taskid
    //                         WHERE s.pid ={$PID} AND s.type =1 AND a.status =2 AND a.mtid=0 {$where}
    //                         ORDER BY a.pubtime DESC"; 
    //         $data = $this->querylist($sql);
    //          return $data;
    // }
}